<template>
	<view>
		<u-popup :show="show" mode="top" @close="close" @open="open">
			<view><text>人生若只如初见，何事秋风悲画扇</text></view>
		</u-popup>
		<u-button @click="show=true">打开</u-button>
	</view>
</template>

<script>
import { song_detail } from '@/network/https/api.js';
import { user_like } from '@/network/https/user.js';
export default {
	data() {
		return {
			userid: '',
			show: false
		};
	},
	onLoad() {
		this.userid = uni.getStorageSync('user_email');
		this.likemusic();
	},
	methods: {
		async likemusic() {
			const { data: res } = await user_like();
			console.log(res);
			let id = [];
			res.ids.forEach((items, index) => {
				return id.push(items);
			});
			const { data: songs } = await song_detail(id);
			console.log(songs);
		},
		open() {
			// console.log('open');
		},
		close() {
			this.show = false
			// console.log('close');
		}
	}
};
</script>

<style></style>
